<div class="row">
  <div class="col-md-8">
    <div class="search-bar">
      <app-time-control-search></app-time-control-search>
    </div>
  </div>
  <div class="col-md-3">
    <select class="form-control" id="parameter" [(ngModel)]="selectParameter" (change)="parameterChange(selectParameter)">
      <option *ngFor="let parameter of parameters" [value]='parameter'>
        {{parameter}}
      </option>
    </select>
  </div>
  <div class="col-md-1">
    <button class="btn"(click)="addparameter()">+</button>
  </div>
</div>


<table class="table" id="table">
  <tr>
    <th *ngFor="let th of ths;let i = index" [class.td-left]="!i" [class.td-right]="i">
      <div class="parameter-top" *ngIf="i<=thlength">{{th}}</div>
      <div class="border-parameter" *ngIf="i>thlength"><span>{{th}}<button class="remove" (click)="removparameter(i)">×</button></span></div>
    </th>
  </tr>
  <tr *ngFor="let row of data;let i=index">
    <td *ngFor="let td of row;let j = index" [class.td-left]="!j" [class.td-right2]="j"><div *ngIf="!i||j">{{td}}</div>
      <div class="border" *ngIf="i&&!j"><span>{{td}}<button class="remove" (click)="remove(i)">×</button></span></div>
    </td>
  </tr>
</table>
<div class="row" style="width: 800px">
  <div class="col-md-6">
    <div class="row">
      <div class="col-md-4">
        <select class="form-control" id="company" [(ngModel)]="selectCompany" (change)="companyChange(selectCompany)">
          <option *ngFor="let company of select1.companys" [ngValue]='company'>
            {{company.name}}
          </option>
        </select>
      </div>
      <div class="col-md-4">
        <select class="form-control" [(ngModel)]="selectStation" (change)="stationChange(selectStation)">
          <option *ngFor="let station of select1.stations" [ngValue]='station'>
            {{station.name}}
          </option>
        </select>
      </div>
      <div class="col-md-4">
        <select class="form-control" [(ngModel)]="selectUnit" (change)="unitChange(selectUnit)">
          <option *ngFor="let unit of select1.units" [ngValue]='unit'>
            {{unit.name}}
          </option>
        </select>
      </div>
    </div>
  </div>
  <div class="col-md-1">
    <button class="btn"(click)="addunit()">+</button>
  </div>
</div>
